Conversation
benjamin-kirkbride
commented
May 20, 2025
|
Let's not re-format all the test 😄 |
|
maybe also somewhere in the documentation reference https://www.redblobgames.com/grids/hexagons/? As its a really good primer on a lot of the hex logic that's being used here esp around the coordinate spaces |
|
I'm also confused why this PR seems to include a bunch of work on the platformer tutorial. Is it just a merge issue or are there two PRs accidentally stuck together? |
|
Sorry about the formatting stuff, I was rushing to get this done before leaving PyCon. I'll remove that stuff |
All of what I did was based on that, so this is a good idea if someone wants to pick that up and do it |
e10c264 to
9205c1d
Compare
|
Okay @einarf @DragonMoffon we should be good now. Sorry about the mess lol |
|
Reviewing this again I realized that this isn't really a hexagon shape? I still think the cube coordinate helpers are useful, but we should also make a Hexagon shape that matches with |
|
Yeah this is for supporting hexagon tile maps. Sorry, could have made that clear |
I think what I'm building now will support this endeavor, so no harm no foul! Glad you did this work, I think it's good for the library, I'm only worried about naming stuff. |
|
Maybe my object should be HexTile or something? |
If that's a compromise you're willing to make, I like that. |
|
Hey, where did we end up with this? |
|
I think there's still a question of where this fits in with Rect and other future shape work, but I think that can probably be dealt with in the future if/when more work on shapes happens. The tilemap parts of this can be modified to use a new/different one in the future, but as of right now there's not really WIP on that, so I don't think it makes sense to hold this back because of that. @benjamin-kirkbride can you resolve the conflicts in this? |
|
Yes |
Resolve .gitignore conflict, keeping webplayground entries from development. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename the Hex class to HexTile to clarify that this is specifically for hexagonal tile map support, not a general hexagon shape. Also rename related functions (hex_to_pixel, pixel_to_hex, hex_corner_offset, hex_corners) to use the hextile prefix. Add redblobgames.com reference to HexTile class docstring. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@Cleptomania done |